//
//  BVMineDataCell2.m
//  XiangYu
//
//  Created by YYKJ on 2017/6/7.
//  Copyright © 2017年 YYKJ. All rights reserved.
//

#import "BVMineDataCell2.h"

@implementation BVMineDataCell2
{
    UILabel *_contentLb;
    UIView *_view4;

}

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        [self layoutUI];
    }
    
    return self;
}

-(void)layoutUI{
    
    _titleLb = [[UILabel alloc]init];
    [_titleLb setFont:[UIFont systemFontOfSize:14]];
    [_titleLb setTextColor:[UIColor BVTextDarkGrayColor]];
    
    _contentLb = [UILabel new];
    [_contentLb setFont:[UIFont systemFontOfSize:14]];
    [_contentLb setTextColor:[UIColor BVTextGrayColor]];
    
    UIView *bottomView = [UIView new];
    bottomView.backgroundColor = [UIColor clearColor];
    _view4 = bottomView;
    
    [self.contentView sd_addSubviews:@[_titleLb,_contentLb,bottomView]];
    
    _titleLb.sd_layout
    .widthIs(60)
    .heightIs(25)
    .topSpaceToView(self.contentView, 10)
    .leftSpaceToView(self.contentView, 10);
    
    _contentLb.sd_layout
    .topSpaceToView(self.contentView, 10)
    .rightSpaceToView(self.contentView, 10)
    .leftSpaceToView(_titleLb, 10)
    .autoHeightRatio(0);
    
    _view4.sd_layout
    .leftEqualToView(_contentLb)
    .topSpaceToView(_contentLb,0)
    .heightIs(1)
    .widthRatioToView(_contentLb, 1);
    
    [self setupAutoHeightWithBottomView:_view4 bottomMargin:10];
    
}

- (void)setText:(NSString *)text
{
    _text = text;
    
    _contentLb.text = text;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
